<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/register.css">
    <script>
        function loginChick(){
            var name = document.getElementById("username").value;
            var pwd=document.getElementById("password").value;
           const result=document.getElementById("myCheckbox").value;
            if(name==""){
                alert("请输入账号！");
            }
            if(pwd==""){
                alert("密码不能为空");
            }
            else{
                alert("欢迎登录");
            }
        }     
    </script>
</head>
<body>
    <div class="w">
        <div class="registerarea">
            <h3>请登录</h3>
            <div class="register-form">
                <form action="">
                    <ul>
                    <li><label for="">用户名：</label><input type="text"  id="username"  class="inp"></li>
                    <li><label for="">密码：</label><input type="password" id="password" class="inp"></li>
                    <li class="agree"><input type="checkbox" id="myCheckbox" checked> 用户使用协议 <a href="">《购物网用户协议》</a></li>
                    <li><button type="submit" onclick="loginChick()" class="over">登录</button></li>
                </ul>
                </form>
            </div>
            
        </div>
    </div>
</body>
</html>

